<?php foreach ($main as $news_item): ?>

    <h2><?php echo $news_item['title'] ?></h2>
    <div id="main">
        <?php echo $news_item['filename'] ?>
    </div>

<?php endforeach ?>